Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

103
Views
how to get 2 email-addresse in property "To" from function sendEmail()

i use script smtp.js. There is a property "To" in the documentation it says i need to enter an array.

I tried To: ['receiver1@email.tld', 'receiver2@email.tld'],

That does not work. I am looking for the right syntax with no luck so far, anyone a hint please?

Regards, Jan

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

function sendEmail(toemail=[]) {
  Email.send({
    ...
    To: toemail.join(), // it will join array value with ',' and return string
    ...
   }).then().catch();
}

An example is of join

var emails = ['one@gmail.com','two@gmail.com'];
console.log(emails.join())

log will be

one@gmail.com,two@gmail.com
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!